package com.arvato.minipro.controller.front.mall;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import com.arvato.minipro.bean.bean_dto.common.PageData;
import com.arvato.minipro.bean.bean_dto.common.Query;
import com.arvato.minipro.service.mall.EcBillboardService;

/**
 * 
 * @author: smallking
 * 
 * @Descibe:前台小程序和商品相关的接口
 * 
 * @Date: 2018年5月4日  下午2:58:39
 */
@Controller
@RequestMapping(value = "/mall/billboard")
public class BillboardController {
	
	@Autowired
	private EcBillboardService ecBillboardService;
	
	/**
	 * 查询广告牌列表
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value="/list", method={RequestMethod.POST})
	public PageData list(@RequestParam Map<String, Object> param){
		Query query = new Query(param);
		PageData pageData = ecBillboardService.listBillboardByQuery(query, query.getPageNum(), query.getPageSize());
		pageData.setFront(true);
		return pageData;
	}
	
}
